package com.zzy.test;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.crypto.password.PasswordEncoder;

import javax.annotation.Resource;

@SpringBootApplication
@Slf4j
public class EmailCodeAuthenticationApplication implements CommandLineRunner {

	@Resource
	PasswordEncoder passwordEncoder;

	public static void main(String[] args) {
		SpringApplication.run(EmailCodeAuthenticationApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		String userPassword = passwordEncoder.encode("user");
		log.info("user加密后{}", userPassword);
	}
}
